﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using Common;

namespace VMS_REST_JSON_Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRateMasterService" in both code and config file together.
    [ServiceContract]
    public interface IRateMasterService
    {
        [OperationContract]
        [WebGet(UriTemplate = "/Masters/master_types/", ResponseFormat = WebMessageFormat.Json)]
        ArrayList GetMasterTypes();
        
        [OperationContract]
        [WebGet(UriTemplate="/Masters/charge_codes/",ResponseFormat=WebMessageFormat.Json)]
        ArrayList GetChargeCodes();

        [OperationContract]
        [WebGet(UriTemplate = "/Masters/unit_codes/", ResponseFormat = WebMessageFormat.Json)]
        ArrayList GetUnitCodes();


        [OperationContract]
        [WebGet(UriTemplate = "/Masters/default_code/", ResponseFormat = WebMessageFormat.Json)]
        ArrayList GetDefaultUnitCodes();

        [OperationContract]
        [WebGet(UriTemplate = "/Masters/{master_type}/", ResponseFormat = WebMessageFormat.Json)]
        ArrayList GetItemsByMasterType(string master_type);

        //To execute this method pass master_type thru parameter and status thru json body
        //
        [OperationContract]
        [WebInvoke(Method="POST", UriTemplate = "/Masters/{master_type}/status/",BodyStyle=WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json,RequestFormat=WebMessageFormat.Json)]
        List<Master_Items> GetMasterItems(string master_type, string status);

    }
}
